 <?
        require_once('header.php'); // uri  
        ?>
         <script type="text/javascript" src="js/jquery.validate.js"></script>  
        <link rel="stylesheet" href="css/login.css"> 
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
        <![endif]-->
       	
        <div class="wrapper wrpResetPassword">
            <i class="siteLogo"></i>
            <p class="resetPwd namePage">Reset Password</p>
            <p class="enterPwd desPage">Enter your new password</p>
            <form class="formResetPwd" id="formResetPwd">
                <input class="inptPwd inptUserPwd" name="password2" id="password2" type="password" placeholder="Password">
                <input class="inptPwdConfirm inptUserPwd" id="repassword"  name="repassword" type="password" placeholder="Confirm Password">
                <input  id="forgetcode"  name="forgetcode" type="hidden" value="<?=$this->data['forgetcode']?>" >
                <button class="btnUpdatePwd" >Update Password</button>
            </form>
            
            <script>
            
       $().ready(function() {
            $("#formResetPwd").validate({ 
            rules: {
            password2: {
               required: true,
               maxlength:16
             },
            repassword:{   
             equalTo: "#password2"
             }
            
           },
           messages: {   
           password2: "Please enter your password",
           repassword: "Please enter your username"
           },
           submitHandler: function() { 
           

           postCORS('<?=serviceinfo?>resetpassword',$('#formResetPwd').serialize() ,function(data) {
         
                  if(data.error==0)
                  {
                    
                    location.href="<?=baseinfo?>/login";
                  
                  }else
                  {
                  
                   alert(data.error);
                   
                  }

                 return false; 
           });
           return false;
           
           
           }
            });
        });
      </script>
        
      
        </div>
   <?
        require_once('footer.php'); // uri  
        ?>